package com.tutu.xml.entity;

/**
 * @Program: Spring_New
 * @Description: 基于xml的构造方法注入
 * @Author: JK.TuTu
 * @Create: 2022-09-13 22:10
 **/
public class StudentPlus {

    private int id;

    private String name;

    private School school;

    /**
     * 通过构造方法注入
     * @param id
     * @param name
     * @param school
     */
    public StudentPlus(int id, String name, School school) {
        this.id = id;
        this.name = name;
        this.school = school;
        System.out.println("StudentPlus的构造方法");
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSchool(School school) {
        this.school = school;
    }

    @Override
    public String toString() {
        return "StudentPlus{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", school=" + school +
                '}';
    }
}
